package com.jinlia.show.modules.openservice.entity;

import lombok.Data;

@Data
public class ChatMessage<T> {
    /**
     * 消息id
     */
    private String id;
    /**
     * 1:在线人数,2:历史记录,3:文字消息,4:撤回，5:语言,6:前端心跳,7:后端心跳,8:登录用户,11：退出
     */
    private Integer type;

    private T data;

    @Data
    public static class Message {

        /**
         * 昵称
         */
        private String nickname;

        private Integer type;
        /**
         * 头像
         */
        private String avatar;
        /**
         * 内容
         */
        private String content;
        /**
         * 用户id
         */
        private String userId;

        private String toUserId;

        private String ipAddress;
        private String ipSource;
    }

}
